project(P2)

add_library(sockets SHARED sockets_.cpp TCP.cpp udp.cpp cliente.cpp server.cpp)

add_executable(ServerTCP mainTCPserver.cpp)
add_executable(ServerUDP mainUDPserver.cpp)
add_executable(ClientTCP mainTCPclient.cpp)
add_executable(ClientUDP mainUDPclient.cpp)

target_link_libraries(ServerTCP sockets)
target_link_libraries(ServerUDP sockets)
target_link_libraries(ClientTCP sockets)
target_link_libraries(ClientUDP sockets)
